const koaRouter = require('@koa/router')
const { create, remove, update, get, getList } = require('../controller/teamController.js')
const { verifAuth } = require('../middleware/login.middleware.js')

const teamRouter = new koaRouter({ prefix: '/team' })
// 增加
teamRouter.post('/', verifAuth, create)
// // 查
teamRouter.get('/:id', get)
teamRouter.get('/', getList)
// // 改
teamRouter.post('/:id', verifAuth, update)
// // 删
teamRouter.delete('/:id', verifAuth, remove)
module.exports = teamRouter
